package com.daxia.bumall.common;

public enum ProductSortType {  //商品排序
	Hot(1, "人气"), 
	Soldout(2, "销量"),
	New(3, "新品"),
	Price(4, "价格");

	private int value;
	private String remark;

	private ProductSortType(int value, String remark) {
		this.value = value;
		this.remark = remark;
	}

	public int getValue() {
		return value;
	}
 
	public String getRemark() {
		return remark;
	}

	public static ProductSortType getByValue(int value) {
		for (ProductSortType o : ProductSortType.values()) {
			if (o.getValue() == value) {
				return o;
			}
		}
		return null;
	}
}